--
-- Author:      name
-- DateTime:    2018-04-23 17:19:33
-- Description: 管理global进程

local skynet = require "skynet"
local log = require "Log"
local cluster = require "cluster"
require "skynet.manager"

local Objects = require "Objects"
local Command = require "Command"
local Message = require "Message"

g_objects = Objects.new()

local function init(  )
	local message = Message.new()
	g_objects:add(message)
	local command = Command.new(message)
	g_objects:add(command)
	g_objects:hotfix()
	skynet.dispatch("lua", message:dispatch())
end

---------------------------------------------------------
-- skynet
---------------------------------------------------------

skynet.start(function()
	init()
	skynet.register('.proxy')
end)